import React from 'react';
import { Col, Row } from 'antd';
import styles from '../styles.less';
import CustomHandlerSelector from '@/components/CustomHandlerSelector';

function Custom({ value, onChange }) {

  return (
    <Row style={{ width: '100%' }}>
      <Col style={{ display: 'flex', alignItems: 'center' }}>
        <div className={styles.label}>自定义规则</div>
        <div
          className={styles.item}
          style={{ display: 'flex', flexDirection: 'column', flexBasis: 400 }}
        >
          <CustomHandlerSelector
            value={value}
            url="/validation/listCustomValidators"
            onChange={onChange}
          />
        </div>
      </Col>
    </Row>
  );
}

export default Custom;
